#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Button.H>
#include "main.h"
#include <iostream>
void btn1_cb(Fl_Widget*, void*)
{
    std::cout << "btn1_cb " << std::endl;
    SetHookOn();
}
void btn2_cb(Fl_Widget*, void*)
{
    std::cout << "btn2_cb " << std::endl;
    SetHookOff();
}
int main (int argc, char ** argv)
{
  Fl_Window *window;
  window = new Fl_Window (300, 180);
    Fl_Button * btn1 = new Fl_Button(0, 0, 80, 80, u8"启用钩子");
    btn1->callback(btn1_cb);
    Fl_Button * btn2 = new Fl_Button(80, 0, 80, 80, u8"停用钩子");
    btn2->callback(btn2_cb);
  window->end ();
  window->show (argc, argv);

  return(Fl::run());
}
